package com.carlinfo.stu_ques.users.dao.impl;

import java.io.File;

import com.carlinfo.stu_ques.common.dao.impl.BaseDaoimpl;
import com.carlinfo.stu_ques.users.dao.IGrade;
import com.carlinfo.stu_ques.users.pojo.Grade;

public class GradeDaoimpl extends BaseDaoimpl<Grade>  implements IGrade
{
	Grade grade = new Grade();
	File file = new File(parentFile, "grade.dat");
	public GradeDaoimpl()
	{
		readFile(file);
	}
	public int savaOneDao(Grade grade)
	{
		grade.setId(count);
		tempId = grade.getId();
		super.savaOneDao(grade);
		writeFile(file);
		return tempId;
	}
	@Override
	public void updateOneDao(Grade grade)
	{
		tempId = grade.getId();
		super.updateOneDao(grade);
		writeFile(file);
	}

	@Override
	public void deleteOneDao(Grade grade)
	{
		tempId = grade.getId();
		super.deleteOneDao(grade);
		writeFile(file);
	}	

}
